package com.hgyc.mom.mes.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.annotation.DictColumn;
import com.hgyc.mom.core.annotation.TableDict;
import com.hgyc.mom.core.mybatis.EQ;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 班组
 * </p>
 *
 * @author fwj
 * @since 2025-07-01
 */
@Data
@TableName("mes_team")
@Schema(name="班组对象", description="班组对象")
public class MesTeam implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "班组ID")
    private Long id;

    @Excel(name = "班组编号")
    @EQ
    @Schema(description = "班组编号")
    private String teamCode;

    @Excel(name = "班组名称")
    @EQ
    @Schema(description = "班组名称")
    private String teamName;

    @Excel(name = "班长")
    @Schema(description = "班长")
    @TableDict(table = "sys_user", key = "id", columns = {
            @DictColumn(name = "name", alias = "masterName")
    })
    private Long masterId;

    @Excel(name = "班组类型")
    @EQ
    @Schema(description = "班组类型")
    private String teamType;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}